const app={


    state:{

      //级联选择器
      c:{
        show:false,
        province:"重庆",
        city:"重庆市",
        town:"南岸区",
        address:"",
        show2:false,
        show3:false,
      },

      //公司
      cp:{
        //公司名
        fn:"",
        //备用名
        sn:[],
        //注册资金
        money:0,
        //法人
        legals:[],
        //经营范围
        manage:"",
        //企业类型
        type:"",

      }

    },

    mutations:{
       cpType(state,type){
         state.cp.type=type;
       },

      //经营范围
      cpManage(state,manage){
        state.cp.manage=manage;
      },
      cpLegals(state,legals){
        state.cp.legals=legals;
      },

      //删除法人
      cpReLegals(state,index){
        state.cp.legals.splice(index,1);
      },
      //添加法人
      cpAddLegals(state,legal){
        state.cp.legals.push(legal);
      },

      //删除备用名
      cpReSn(state,index){
        state.cp.sn.splice(index,1);
      },
      //添加备用名
      cpAddSn(state,sn){
        state.cp.sn.push(sn);
      },

      //设置地址
      cAddress(state,address){
        state.c.province=address.province;
        state.c.city=address.city;
        state.c.town=address.town;
        state.c.address=address.province+"-"+address.city+"-"+address.town;
      },

      //是否显示级联选择器
      cShow(state,show){
        state.c.show=show;
      },
      //是否显示级联选择器
      cShow2(state,show){
        state.c.show2=show;
      },
      //是否显示级联选择器
      cShow3(state,show){
        state.c.show3=show;
      }

    },

    actions:{



    },



}


export default app;































